var tagLink= $('<link/>',{
    "type":"text/css",
    "rel":"stylesheet",
    //"href":"modules/Accounts/css/style.css"
    "href":"custom/modules/Accounts/css/ui-lightness/jquery-ui-1.8.13.custom.css"
});

var  tagUI = $('<link/>',{
    'type' : 'text/css',
    'rel'  : 'stylesheet',
    'href' : 'custom/modules/Accounts/css/autocomplete.css'

});

$('head').append(tagUI);

$("head").append(tagLink);

$(function(){
    checkboxchecked();
    $('input[type=checkbox]').click(function(){
        checkboxchecked();
    }) ;

    /*$('.tinhthanh').autocomplete({
        source:function(req,add){
            $.getJSON('AjaxAutocomplte.php?callback=?val='+$('.tinhthanh').val(),req,function(data){
                /*add($.map(data, function(item) {
                    return {
                        label: item.name,
                        value: item.id
                    }
                })) 
                 var suggestions=[]; 
                 $.each(data,function(i,val){
                    suggestions.push(val.name);
                 });
                 //console.log(suggestions);
                 
                add(suggestions);
            });
        },
    });*/
});

function checkboxchecked(){
    if($('#uudaithanhtoannoidia').is(':checked')){
        $('#chedouudainoidia').show();
    }
    else{
        $('#chedouudainoidia').hide();
    }

    if($('#uudaithanhtoanquocte').is(':checked')){
        $('#chedouudaiquocte').show();
    }
    else{
        $('#chedouudaiquocte').hide(); 
    }

    if($('#uudaichuyentien').is(':checked')){
        $('#chedouudaichuyentien').show();
    }
    else{
        $('#chedouudaichuyentien').hide(); 
    }

    if($('#uudaivaytien').is(':checked')){
        $('#chedouudaivaytien').show();
    }
    else{
        $('#chedouudaivaytien').hide(); 
    }
}
